package com.xlhj.yucloud.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.annotation.TableField;
import com.xlhj.yucloud.entity.enums.SexEnum;
import com.xlhj.yucloud.entity.enums.StatusEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author: liucaijing
 * @description: SysUserInfo
 * @date: 2021/9/9 21:16
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class SysUserInfo extends BaseEntity {

    private static final long serialVersionUID = -8079783615865240705L;

    /**
     * 用户名称
     */
    private String userName;

    /**
     * 密码
     */
    private String password;

    /**
     * 性别0:男;1:女;2:未知
     */
    @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
    private SexEnum sex;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 手机号
     */
    private String phonenumber;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 状态0:正常;1:停用
     */
    @JSONField(serialzeFeatures = SerializerFeature.WriteEnumUsingToString)
    private StatusEnum status;

    /**
     * 角色ID
     */
    @TableField(exist = false)
    private Long[] roleIds;
}
